/**
 * ____________________ *
 *  ____ ____ ____ _  _ *
 *  |___ [__] |--< |\/| *
 * ____________________ *
 *
 * THE CORM PROJECT
 *
 * This file may only be used in accordance with the
 * terms of the Academic Free License ("AFL") v. 3.0,
 * as published by the Open Software Initiative.  A
 * copy of this license is provided in this source
 * release, and may be viewed online at:
 *
 * (http://www.opensource.org/licenses/afl-3.0.php)
 */
package org.eremite.corm.party;

import org.eremite.corm.BaseArchetype;

import javax.persistence.Entity;
import java.util.Date;

@Entity
public class PersonName
        extends BaseArchetype {

    private String prefix = "";
    private String givenName = "";
    private String middleName = "";
    private String familyName = "";
    private String preferredName = "";
    private String suffix = "";
    private Date validFrom = null;
    private Date validTo = null;

    public PersonName() {}

    public PersonName(
            String prefix,
            String givenName,
            String preferredName,
            String middleName,
            String familyName,
            String suffix) {
        setPrefix(prefix);
        setGivenName(givenName);
        setPreferredName(preferredName);
        setMiddleName(middleName);
        setFamilyName(familyName);
        setSuffix(suffix);
    }

    public PersonName(String givenName){
        setGivenName(givenName);
    }

    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    public String getGivenName() {
        return givenName;
    }

    public void setGivenName(String givenName) {
        this.givenName = givenName;
    }

    public String getMiddleName() {
        return middleName;
    }

    public void setMiddleName(String middleName) {
        this.middleName = middleName;
    }

    public String getFamilyName() {
        return familyName;
    }

    public void setFamilyName(String familyName) {
        this.familyName = familyName;
    }

    public String getPreferredName() {
        return preferredName;
    }

    public void setPreferredName(String preferredName) {
        this.preferredName = preferredName;
    }

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public Date getValidFrom() {
        return validFrom;
    }

    public void setValidFrom(Date validFrom) {
        this.validFrom = validFrom;
    }

    public Date getValidTo() {
        return validTo;
    }

    public void setValidTo(Date validTo) {
        this.validTo = validTo;
    }
}